/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package view;

import java.awt.Component;
import java.awt.Dimension;
import java.awt.Toolkit;
import javax.swing.JComboBox;

/**
 *
 * @author Felipe
 */
public class ViewUtil {
    
    private final static String[] ESTADOS = {"SP", "XD"};
    
    public static void centralizaComponente(Component pComponent) {  
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();  
        Dimension componentSize = pComponent.getSize();  
        pComponent.setLocation((screenSize.width - componentSize.width) / 2, (screenSize.height - componentSize.height) / 2);  
    }
    
    public static void preencheEstados(JComboBox pComboBox) {
        pComboBox.setModel(new javax.swing.DefaultComboBoxModel(ESTADOS));
    }
    
}
